package com.work.shart.web.res.goods;

import com.work.shart.web.entity.classifcation.ClassificationEntity;
import com.work.shart.web.entity.goods.GoodsEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;


@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("摘要列表")
@Builder
@Document(indexName = "goods", indexStoreType = "goods_es")
public class GoodsRes implements Serializable {
    @ApiModelProperty("主键")
    private Long id;
    /**
     * 标题
     */
    @ApiModelProperty("标题")
    @Field(type = FieldType.Text)
    private String hotTitle;

    /**
     * 类别id
     */
    @ApiModelProperty("类别id")
    private Long classifationId;

    /**
     * 缩略图
     */
    @ApiModelProperty("缩略图")
    private String mainUrl;

    /**
     * 阅读量
     */
    @ApiModelProperty("阅读量")
    private Long readingVolume;

    /**
     * 收藏量
     */
    @ApiModelProperty("收藏量")
    private Long collectionVolume;

    /**
     * 价值多少元
     */
    @ApiModelProperty("价值多少元")
    private Long valuePrice;

    /**
     * 单价
     */
    @ApiModelProperty("单价")
    private Double price;

    /**
     * 简要内容
     */
    @ApiModelProperty("简要内容")
    @Field(type = FieldType.Text)
    private String textArea;

    @ApiModelProperty("分类")
    @Field(type = FieldType.Text)
    private ClassificationEntity classification;


}
